
#include "register.h"

int main(int argc, char ** argv)
{   
	//修改端口权限为可读写
	int ret = iopl(3);
	if(ret == -1)
	{
		printf("iopl error.\n");
		return -1;
	}

	outb(0xa35, 0x0c);
	outb(0xa36, 0x10); //这个是对寄存器读写

	outb(0xa35, 0x7b);
	outb(0xa36, 0x2a);

	int i,j;
    for (i = 0; i < ARRAY_SIZE(superio_ports_table); i++) {
		for (j = 0; superio_ports_table[i].ports[j] != EOT; j++)
			superio_ports_table[i].probe_idregs(
				superio_ports_table[i].ports[j]);
	}

    iopl(0);

	printf("1111Superiotool must be run as root.\n");

	return 0;
}